<template>
  <div>
    <a-modal
      ok-text="确认"
      cancel-text="取消"
      :maskClosable="false"
      :title="'添加下拉框选项'"
      :width="modalWidth"
      @cancel="handleClose"
      @ok="handleOk"
      :destroyOnClose="true"
      :visible="visible"
      footer=""
    >
      <template>
        <div class="modalBut">
          <a-button @click="handleClose">
            取消
          </a-button>
          <a-button @click="handleOk" type="primary">确认</a-button>
        </div>
      </template>
      <textarea class="option-text" placeholder="以;分隔选项" cols="30" rows="10" v-model="inputData"></textarea>
    </a-modal>
  </div>
</template>
<script>
export default {
  data() {
    return {
      visible: false, // 状态
      modalWidth: 652, // 抽屉宽度
      inputData:"",
    };
  },
  methods: {
    handleClose() {
      this.visible = false;
    },
    handleOk() {
      this.visible = false;
      this.$emit("ok",this.inputData)
    },
    modalShow() {
      this.visible = true;
    }
  }
};
</script>
<style lang="less" scoped>
.option-text {
  border: 1px solid black;
  width: 100%;
}
</style>
